/usr/src/grafana-enterprise-8.2.5-1.x86_64.rpm:
  file.managed:
    - source: salt://modules/prometheus/files/grafana-enterprise-8.2.5-1.x86_64.rpm
   
grafana-installsh:
  cmd.script: 
    - source: salt://modules/prometheus/files/grafinstall.sh
    - unless: yum provides grafana-enterprise

grafana-server.service:
  service.running:
    - enable: true
    - watch:
      - cmd: grafana-installsh
